{%extends "base.xhtml"%}
{% load i18n %}
{% load ham %}
{%block content%}
	<h2>{%trans "Add problem + task"%}</h2>
	{% if form.has_errors %}
	{%trans "Correct following errors"%}
	{%endif%}

	<form method="post" action="{%href ""%}">
	<p>
		<label for="id_slug">{%trans "Task system name"%}</label>
		{{ form.slug }}
        	{% if form.slug.errors %}*** {{ form.slug.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_name">{%trans "Task name"%}</label>
		{{ form.name }}
        	{% if form.name.errors %}*** {{ form.name.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_startTime">{%trans "Date when start showing task"%}</label>
		{{ form.startTime }}
        	{% if form.startTime.errors %}*** {{ form.startTime.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_endTime">{%trans "Date when submission time ends"%}</label>
		{{ form.endTime }}
        	{% if form.endTime.errors %}*** {{ form.endTime.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_description">{%trans "Problem description"%}</label>
		{{ form.description }}
        	{% if form.description.errors %}*** {{ form.description.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_input">{%trans "Problem input"%}</label>
		{{ form.input }}
        	{% if form.input.errors %}*** {{ form.input.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_output">{%trans "Problem output"%}</label>
		{{ form.output }}
        	{% if form.output.errors %}*** {{ form.output.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_testExamples">{%trans "Problem example tests"%}</label>
		{{ form.testExamples }}
        	{% if form.testExamples.errors %}*** {{ form.testExamples.errors|join:", " }}{% endif %}
	</p>
	<input type="submit" value="{%trans "Add task+problem"%}"/>
	</form>
{%endblock%}
